//
//  mainview.m
//  Christmas box
//
//  Created by GL on 08-11-23.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import "mainview.h"
#import "universal.h"
#import "imagedata.h"

@implementation mainview


- (id)initWithFrame:(CGRect)frame 
{
    if (self = [super initWithFrame:frame]) 
	{
        // Initialization code
		bg = [[UIImageView alloc]initWithFrame:frame];
		bg.backgroundColor = [UIColor whiteColor];
		//bg.image = [universal getImageName:main_background];
		[self addSubview:bg];
		//set the title of the game
		title = [[UILabel alloc]initWithFrame:CGRectMake(90, 150, 140, 40)];
		title.text = @"Merry Christmas!";
		title.font = [UIFont systemFontOfSize:18];
		title.textColor = [UIColor redColor];
		[bg addSubview:title];
		
		//初始化礼品盒
		box = [[UIImageView alloc]initWithFrame:CGRectMake(110, 380, 100, 100)];
		box.backgroundColor = [UIColor brownColor];
		//box.image = [universal getImageName:main_box];
		[bg addSubview:box];
		
		//初始化礼品盒的带子
		boxbelt = [[UIImageView alloc]initWithFrame:CGRectMake(110, 350, 100, 30)];
		boxbelt.backgroundColor = [UIColor yellowColor];
		//boxbelt.image = [universal getImageName:main_boxbelt];
		[bg addSubview:boxbelt];
		
    }
    return self;
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
	
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
	
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
	
}
/*
- (void)drawRect:(CGRect)rect 
{
    // Drawing code
}
*/

- (void)dealloc
{
	//[catharine release];
	[boxbelt release];
	[box release];
	[title release];
	[bg release];
    [super dealloc];
}


@end
